﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:loki="clr-namespace:Loki.UI.Wpf;assembly=Loki.UI.Wpf"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
    xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys">
    <Style TargetType="dxlc:LayoutItem" BasedOn="{StaticResource {x:Type dxlc:LayoutItem}}">
        <Setter Property="Margin" Value="3" />
        <Setter Property="ElementSpace" Value="8" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="AddColonToLabel" Value="True" />
    </Style>
    <Style TargetType="dxlc:LayoutControl">
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
    </Style>
    <Style TargetType="dxlc:LayoutGroup">
        <Setter Property="Padding" Value="3" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
    </Style>
    <Style TargetType="dxe:TextEdit">
        <Setter Property="MinWidth" Value="200" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="ValidateOnTextInput" Value="True" />
    </Style>
    <Style TargetType="dxe:TextEdit" x:Key="TextEdit_Multiline" BasedOn="{StaticResource {x:Type dxe:TextEdit}}">
        <Setter Property="MinWidth" Value="200" />
        <Setter Property="ValidateOnTextInput" Value="True" />
        <Setter Property="TextWrapping" Value="Wrap" />
        <Setter Property="AcceptsReturn" Value="True" />
        <Setter Property="MinHeight" Value="70" />
        <Setter Property="VerticalContentAlignment" Value="Top" />
    </Style>
    <Style TargetType="Button">
        <Setter Property="MaxWidth" Value="100" />
    </Style>
    <Style TargetType="dxe:PasswordBoxEdit">
        <Setter Property="MinWidth" Value="200" />
    </Style>
    <Style x:Key="IsChangedBackgroundStyle"  TargetType="{x:Type dxg:GridRowContent}">
        <!--<Setter Property="Background" Value="#BB000000" />
        <Setter Property="Foreground" Value="#FFFFFFFF" />-->
        <Style.Triggers>
            <DataTrigger Binding="{Binding Row.IsChanged}" Value="True">
                <Setter Property="Control.FontWeight" Value ="Bold" />
            </DataTrigger>
            <DataTrigger Binding="{Binding Row.IsChanged}" Value="False">
                <Setter Property="Control.FontWeight" Value ="Normal" />
            </DataTrigger>
            <!--<DataTrigger Binding="{Binding SelectionState}" Value="Selected">
                <Setter Property="Background" Value="#FFF78A09" />
                <Setter Property="Foreground" Value="#BB000000" />
            </DataTrigger>
            <DataTrigger Binding="{Binding SelectionState}" Value="Focused">
                <Setter Property="Background" Value="#FFF78A09" />
                <Setter Property="Foreground" Value="#BB000000" />
            </DataTrigger>-->
        </Style.Triggers>
    </Style>
    <Style TargetType="{x:Type dxe:ErrorControl}" BasedOn="{StaticResource {x:Type dxe:ErrorControl}}">
        <Style.Triggers>
            <DataTrigger Binding="{Binding ErrorType}" Value="Warning">
                <Setter Property="ContentTemplate" Value="{DynamicResource {dxet:ErrorTypesThemeKeyExtension ResourceKey=Warning}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding ErrorType}" Value="Information">
                <Setter Property="ContentTemplate" Value="{DynamicResource {dxet:ErrorTypesThemeKeyExtension ResourceKey=Information}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding ErrorType}" Value="SilentWarning">
                <Setter Property="ContentTemplate" Value="{DynamicResource {dxet:ErrorTypesThemeKeyExtension ResourceKey=Information}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding ErrorType}" Value="Error">
                <Setter Property="ContentTemplate" Value="{DynamicResource {dxet:ErrorTypesThemeKeyExtension ResourceKey=Default}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding ErrorType}" Value="Critical">
                <Setter Property="ContentTemplate" Value="{DynamicResource {dxet:ErrorTypesThemeKeyExtension ResourceKey=Critical}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>